﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RapChieuPhim.DTO;
using RapChieuPhim.DAO;
using System.Collections;
using System.Data;

namespace RapChieuPhim.BUS
{
    class CTPhongBUS
    {
        public static CTPhongChieu GetByID(int rap, int phong, int phim, DateTime ngay)
        {
            CTPhongDAO ctrDAO = new CTPhongDAO();
            return ctrDAO.GetByID(rap, phong, phim, ngay);
        }

        public static IList GetAllbyMaRap(int _MaRap)
        {
            CTPhongDAO ctrDAO = new CTPhongDAO();
            return ctrDAO.GetAllbyMaRap(_MaRap);
        }

        public static IList GetAll()
        {
            CTPhongDAO ctrDAO = new CTPhongDAO();
            return ctrDAO.GetAll();
        }

        public static void Insert(DateTime _NgayChieu, int _MaPhong, int _MaPhim, int _MaRap)
        {
            CTPhongDAO ctrDAO = new CTPhongDAO();
            ctrDAO.Insert(_NgayChieu, _MaPhong, _MaPhim, _MaRap);
        }

        public static void Delete(int rap, int phim)
        {
            CTPhongDAO ctrDAO = new CTPhongDAO();
            ctrDAO.Delete(rap, phim);
        }

        public static void DeleteCuThe(int phong, int phim, DateTime ngay, int rap)
        {
            CTPhongDAO ctrDAO = new CTPhongDAO();
            ctrDAO.DeleteCuThe(phong, phim, ngay, rap);
        }

        public static DataTable CheckLichTrung(int _MaPhong, int _MaPhim, DateTime _NgayChieu, int _MaRap)
        {
            CTPhongDAO ctrDAO = new CTPhongDAO();
            return ctrDAO.CheckLichTrung(_MaPhong, _MaPhim, _NgayChieu, _MaRap);
        }
    }
}
